package com.loster.login.controller;

import com.loster.login.model.LoginReq;
import com.loster.login.model.LoginResp;
import com.loster.login.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/user")
public class UserController {
    @Resource
    private UserService userService;
    @PostMapping("/login")
    public LoginResp login(@RequestBody LoginReq req){
        return userService.login(req);
    }
}
